<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=IE8" />
<meta http-equiv="Cache-Control" content="No-Cache" />
<meta http-equiv="Pragma" content="No-Cache" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
<link rel="stylesheet" type="text/css" href="/resources/theme/metro-blue/easyui.css" />
<link rel="stylesheet" type="text/css" href="/resources/theme/icon.css" />
<link rel="stylesheet" type="text/css" href="/resources/css/ui_custom.css" />
<link rel="stylesheet" type="text/css" href="/resources/css/design.css" />
<link rel="stylesheet" type="text/css" href="/resources/css/form.css" />
<!--[if lt IE 9]>
	<script type="text/javascript" src="/resources/js/html5.js" /></script>
<![endif]-->
<script type="text/javascript" src="/resources/js/jquery-1.9.1.js" /></script>
<script type="text/javascript" src="/resources/js/jquery.easyui.all.js" /></script>
<script type="text/javascript" src="/resources/js/jquery.jclock.js" /></script>
<script type="text/javascript" src="/resources/js/common.js" /></script>
</head>

<body class="easyui-layout">

	<div data-options="region:'north',border:false" class="layout_north">

		<div class="easyui-panel" data-options="fit:true" style="overflow:hidden;position:relative">
			
			<div class="wrap_gnb_logo">
				<div class="gnb_logo">
					<img src="/resources/img/logo_header.png" /><span>재활용관리시스템</span>
				</div>
				
			</div>
			<div class="wrap_gnb_side">
				<span class="gnb_side_btn">
					<span class="logout" title="로그아웃" onclick="location.href='/'">로그아웃</span>
				</span>
				<span class="gnb_user">현재 <b>관리자</b>님이 접속 중입니다.</span>
			</div>
			
			<div class="datagrid-header gnb_menu">
		        <a href="javascript:void(0)" class="easyui-menubutton" data-options="menu:'#mm1'">등록</a>
		        <a href="javascript:void(0)" class="easyui-menubutton" data-options="menu:'#mm2'">통계</a>
		        <a href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-help'">Help</a>
			</div>
		    <div id="mm1">
		        <div>담당자 등록</div>
		        <div id="mm1_02">고객 등록</div>
		        <div>휴일 등록</div>
		        <div>근무시간</div>
		    </div>
		    <div id="mm2">
		        <div>년별 통계</div>
		        <div>월별 통계</div>
		        <div>주간별 통계</div>
		        <div>일별 통계</div>
		        <div class="menu-sep"></div>
		        <div>업체별 주문현황</div>
		        <div>사용자별 확인현황</div>
		    </div>
		</div>
	</div>

	<div data-options="region:'center',border:false">
	
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'center',border:false">
				<div class="easyui-panel bb0" data-options="iconCls:'icon-head01',border:false,fit:true,title:'Callback'">
					<table id="grid_callback" class="easyui-datagrid"></table>
							
					<div id="tb_callback" class="datagrid-toolbar wrap_tbl_toolbar">	
						<table class="tbl_inner">	
							<colgroup>
								<col width="85px">
								<col width="217px">
								<col width="60px">
								<col width="75px">
								<col width="65px">
								<col width="270px">
							</colgroup>
							<tr>
								<th>조회기간</th>
								<td>
								    <input class="easyui-datebox" data-options="formatter:myformatter"></input> ~
								    <input class="easyui-datebox" data-options="formatter:myformatter,parser:myparser"></input>
								</td>
								<th>확인여부</th>
								<td>
									<select>
										<option>전체</option>
										<option>확인</option>
										<option>미확인</option>
									</select>
								</td>
								<th>채널설정</th>
								<td>
									<input type="radio">전체&nbsp;&nbsp;
									<input type="radio">1ch&nbsp;&nbsp;
									<input type="radio">2ch&nbsp;&nbsp;
									<input type="radio">3ch&nbsp;&nbsp;
									<input type="radio">4ch
								</td>
							</tr>
							<tr>
								<th>고객전화번호</th>
								<td class="formText"><input type="text" value=""></td>
								<th>업체명</th>
								<td colspan="3" class="formText"><input type="text" value=""></td>
								<td><a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">조회</a></td>
							</tr>
						</table>
					</div>
				</div>
			</div>
			<div data-options="region:'south',border:false" style="height:40px">
				<div class="easyui-panel combobox-item-selected padding5" data-options="fit:true">	
					<table class="tbl_inner">	
						<colgroup>
							<col>
							<col width="90px">
							<col>
						</colgroup>
						<tr>
							<th>담당</th>
							<td>
								<select>
									<option>관리자</option>
								</select>
							</td>
							<td><a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cut'">삭제</a></td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		
	</div>

	<div data-options="region:'south',border:false" class="layout_south">
		Copyright 2013 Suwon City Facilities Management Corporation.
		<p class="clock">	
			<span id="date"></span>
			<span id="clock"></span>
		</p>
	</div>
	
</body>

<script type="text/javascript">
//캘린더
function myformatter(date){
    var y = date.getFullYear();
    var m = date.getMonth()+1;
    var d = date.getDate();
    return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);
}
function myparser(s){
    if (!s) return new Date();
    var ss = (s.split('-'));
    var y = parseInt(ss[0],10);
    var m = parseInt(ss[1],10);
    var d = parseInt(ss[2],10);
    if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
        return new Date(y,m-1,d);
    } else {
        return new Date();
    }
}

//그리드
$('#grid_callback').datagrid({
	rownumbers:true,
    fitColumns: true,
    //singleSelect: true,
    fit: true,
    striped: true,
    toolbar:'#tb_callback',
    //pagination: true,
    nowrap: true,
    data: [
		{num:"1",date:"2013-11-12",reviewer:"심사자",id:"9912992",seq:"5",ver:"2013-11-11 V1",name:"갑상선종",comment:"인수기준의 사망보장에 대해 거절이 아닌",result:"오류"},
		{num:"2",date:"2013-11-12",reviewer:"심사자",id:"9912992",seq:"5",ver:"2013-11-11 V1",name:"갑상선종",comment:"정상확인되었습니다.",result:"정상"}
 	],
    columns:[[
        {field:'num',width:0,hidden:true},
        {field:'info',fixed:true,width:20,checkbox:true},
      	{field:'date',title:'작업일자',fixed:true,width:90,align:'center'},
      	{field:'reviewer',title:'심사자명',fixed:true,width:70,align:'center'},
      	{field:'id',title:'심사자ID',fixed:true,width:70,align:'center'},
      	{field:'seq',title:'작업SEQ',fixed:true,width:70,align:'center'},
      	{field:'ver',title:'버전',fixed:true,width:100,align:'center'},
      	{field:'name',title:'질병명',fixed:true,width:180},
      	{field:'comment',title:'심사자Comment',width:200,formatter:detailLink},
      	{field:'result',title:'검토결과',fixed:true,width:60,align:'center'}
    ]],
// 	rowStyler: function(index,row){
// 	    if (row.num < 2){
// 	        return 'font-weight:bold;';
// 	    }
// 	},
	onDblClickRow: function(){
		location.href='${ctx}/rvhistory/detail';
	}
});
function cellStyler(index,row){
    if (row.num < 2){
        return '<span class="grid_error"></span>';
    }
}
function detailLink(val,rec){
	return '<a href="${ctx}/rvhistory/detail">'+val+'</a>';
}

//메뉴링크
$(function(){
    $('#mm1_02').bind('click', function(){
    	window.open('/html/popup_custom.jsp', 'popup_custom', 'scrollbars=no, resizable=no, status=yes, width=700, height=600, left=0, top=0');
    });
});
</script>
</html>